package com.shop.zkmall.app.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 余额明细表（用户资金流水）
 * </p>
 *
 * @author ${author}
 * @since 2025-11-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cere_buyer_balance_detail")
@ApiModel(value="CereBuyerBalanceDetail对象", description="余额明细表（用户资金流水）")
public class CereBuyerBalanceDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "变动类型：0支出 1收入")
    private Integer changeType;

    @ApiModelProperty(value = "变动金额（正数或负数）")
    private BigDecimal amount;

    @ApiModelProperty(value = "变更前余额")
    private BigDecimal beforeAmount;

    @ApiModelProperty(value = "变更后余额")
    private BigDecimal afterAmount;

    @ApiModelProperty(value = "备注信息")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}
